/*
 * run2.cpp
 *
 *  Created on: Nov 15, 2010
 *      Author: snirgaz
 */

#include "HelpLibs/def.h"
#include "Qmc.h"
#include "ParallelTempring.h"
#include "InputFile.h"
#include "ArrayMultiD.h"
//#include "Test.h"

using namespace std;

void run(char * in_file) {
	vmlSetMode (VML_LA);
	vmlSetMode (VML_ERRMODE_IGNORE);
	string file_name = in_file;
	InputFile in(file_name);
	in.readFile();
#ifdef PT
	ParallelTempring sim(in.getQmcParams(), in.getPTParams());
	omp_set_num_threads(in.getPTParams().coreNum);
	// ippSetNumThreads(1);
	sim.run();
	sim.dump();
#else
	Qmc sim(in.getQmcParams());
	bool done = sim.run();
	sim.dump();
#endif
	cout << "done";
}
int main(int argc, char* argv[]) {
	assert(argc == 2);
	char * in_file;
	in_file = argv[1];
//	Test test;
//	test.VecObsTest();
	run(in_file);
	return 0;
}
